Conversation
Co-authored-by: chenpeizhi <8114085+chenpeizhi@users.noreply.github.com>
|
@copilot Revert your changes and start over. You need to first learn to properly install drudge. Start from the HEAD of the |
Reverted my changes and started fresh from the HEAD of the pep621 branch following the proper installation instructions. Set up the environment with
Ready to address the actual SymPy upgrade issues. Commit: ce50f3a |
Pull Request Test Coverage Report for Build 17441167792Details
💛 - Coveralls |
Co-authored-by: chenpeizhi <8114085+chenpeizhi@users.noreply.github.com>
tests/nuclear_test.py and one in tests/spin_one_half_test.py failed due to the upgrade from SymPy 1.4 to SymPy 1.5 (#14). See the recent GitHub Actions workflow log files for the error messages. Check the SymPy release notes and implem...|
@copilot The error in tests/spin_one_half_test.py is not related to quantum physics objects in SymPy. BTW, can you try to fix the other failed tests (see the GitHub Actions workflow log). |
Looking at the GitHub Actions logs. Found two main failures:
Working on fixing both issues. The pickle error was due to incompatible new signature during unpickling. |
Co-authored-by: chenpeizhi <8114085+chenpeizhi@users.noreply.github.com>
… handling Co-authored-by: chenpeizhi <8114085+chenpeizhi@users.noreply.github.com>
Co-authored-by: chenpeizhi <8114085+chenpeizhi@users.noreply.github.com>
Fixes compatibility issues that arose from upgrading SymPy from 1.4 to 1.13.2, addressing multiple test failures:
Problems Fixed
1. Quantum Physics Objects Compatibility
SymPy 1.13.2 introduced stricter validation for quantum physics objects (CG, Wigner3j, Wigner6j), preventing
doit()calls on symbolic expressions. This broke drudge's simplification pipeline, causing test failures in:tests/nuclear_test.py::test_varsh_872_5tests/nuclear_test.py::test_wigner3j_sum_to_wigner6j2. DrsSymbol Pickle Support
The
DrsSymbolclass had incompatible pickle methods that failed during unpickling, causing:tests/free_algebra_test.py::test_pickle_within_drs-TypeError: DrsSymbol.__new__() missing 1 required positional argument: 'name'Solution
Quantum Physics Objects
_safe_simplify()function that detects symbolic quantum physics objects and avoids callingdoit()on them_simplify_amps()and_simplify_symbolic_sum()methods to use safe simplificationsimplify()on quantum expressionsDrsSymbol Pickle Support
DrsSymbol.__new__()and__init__()methods to handleNonedrudge parameter during unpickling__setstate__()method to properly restore object state after unpicklingTesting
Nuclear physics tests now pass with quantum physics functionality preserved. DrsSymbol objects can be properly pickled and unpickled within drudge script environments. All changes maintain compatibility with modern SymPy versions while preserving existing behavior.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.